<?php

namespace app\api\controller\v1;
use app\api\model\Category as CategoryModel;
class Category
{
    public function getAllCategories(){
        $categorise = CategoryModel::all([],'Image');
        if($categorise->isEmpty())
            throw new CategoryException();
        return $categorise;
    }
}
